<?php
     
        require 'QueryList.class.php';
        header("Content-type: text/html; charset=utf-8");     
        $url = "https://www.autohome.com.cn/news/201712/911228.html#pvareaid=102624";
        phpQuery::newDocumentFile($url);
        $text = pq(".row #articlewrap #articleContent>p:not(:last)")->text();
        $text .= pq(".row #articlewrap #articleContent img")->attr('src');

       echo  $text;

       echo ("<img src=\" $text .\" ");



/*
$ul = "<ul>";
foreach($rs as $v){
   // $ul .= "<img src=".$v[img]." width='30px;'>";
    $ul .= "<img src=".$v['img']." style='display:block;float:left;margin-left:60px;width:80px;height:40px;'>";
  //  $ul .= "<li class='tit' style='color:red'><a >".$v['href']."</a></li>";
   // $ul .= "<li class='tit' style='color:red'><a >".$v['img']."</a></li>";
}
$ul .= "</ul>";
echo $ul;









    require 'QueryList.class.php';
    require 'phpQuery.php';
    use QL\QueryList;

$html = 'https://www.autohome.com.cn/news/201712/911228.html#pvareaid=10262 

';
//$html = iconv('','UTF-8GBK',file_get_contents($html));
 $data = QueryList::Query($html,array(
        'content' => array('#articleContent','html','-p:last -.diversion-box a p')
    ),'','UTF-8','GB2312',true)->getData(function($item){
        return $item;
    });
print_r($data);








$html = file_get_contents('https://www.autohome.com.cn/news/201712/911228.html#pvareaid=102624 
');
            
            $ql = QueryList::html($html);
            $html = $ql->getHtml();
            $data = QueryList::html($html)->rules([
                        'content' =>['#articleContent','html','-p:last -.diversion-box a p'],
                       // 'content_text' =>['#articleContent a','text','-p:last #diversion-box'],
                    
                    ])->removeHead()->encoding('UTF-8','GB2312')->query()->getData(); 
            $data = $data->all();
            var_dump($data);
            var_dump($ql);

*/



  ?>
